import { createWebHistory, createRouter } from "vue-router";


const my_office = [
    {path: 'my_office/email', component: () => import('./components/my_office/email.vue')},
    { path: 'my_office/personal_center/settings', component: () => import('./components/my_office/settings.vue') }, 
    { path: 'my_office/personal_center/reminders', component: () => import('./components/my_office/reminders.vue') }, 
    { path: 'my_office/personal_center/profile', component: () => import('./components/my_office/profile.vue') }, 
    { path: 'my_office/personal_center/salary', component: () => import('./components/my_office/salary.vue') }, 
    { path: 'my_office/personal_center/internal_comms', component: () => import('./components/my_office/internal_comms.vue') }, 
    { path: 'my_office/personal_center/personal_comms', component: () => import('./components/my_office/internal_comms.vue') }, 
    { path: 'my_office/personal_center/uploaded_files', component: () => import('./components/my_office/uploaded_files.vue') }, 
    { path: 'my_office/personal_center/training_exams', component: () => import('./components/my_office/training_exams.vue') }, 
    { path: 'my_office/personal_center/call_records', component: () => import('./components/my_office/call_records.vue') }, 
    { path: 'my_office/notifications', component: () => import('./components/my_office/notifications.vue') }, 
    { path: 'my_office/schedule', component: () => import('./components/my_office/schedule.vue') }, 
    { path: 'my_office/documents', component: () => import('./components/my_office/documents.vue') }, 
    { path: 'my_office/documents/document_reminders', component: () => import('./components/my_office/document_reminders.vue') }, 
    { path: 'my_office/subscribed_reports', component: () => import('./components/my_office/subscribed_reports.vue') }, 
    { path: 'my_office/meetings/today_meetings', component: () => import('./components/my_office/today_meetings.vue') }, 
    { path: 'my_office/meetings/room_status', component: () => import('./components/my_office/room_status.vue') }, 
    { path: 'my_office/punch_card/punch_card_records', component: () => import('./components/my_office/punch_card_records.vue') }, 
    { path: 'my_office/punch_card/punch_records', component: () => import('./components/my_office/punch_records.vue') }, 
    { path: 'my_office/punch_card/out_of_office_records', component: () => import('./components/my_office/out_of_office_records.vue') }, 
    { path: 'my_office/punch_card/punch_anomalies', component: () => import('./components/my_office/punch_anomalies.vue') }, 
    { path: 'my_office/punch_card/punch_info', component: () => import('./components/my_office/punch_info.vue') }, 
    { path: 'my_office/punch_card/punch_stats', component: () => import('./components/my_office/punch_stats.vue') }, 
    { path: 'my_office/punch_card/location_records', component: () => import('./components/my_office/location_records.vue') }, 
    { path: 'my_office/daily_report/my_daily_report', component: () => import('./components/my_office/my_daily_report.vue') }, 
    { path: 'my_office/daily_report/daily_report_stats', component: () => import('./components/my_office/daily_report_stats.vue') }, 
    { path: 'my_office/daily_report/subordinates_daily_report', component: () => import('./components/my_office/subordinates_daily_report.vue') }, 
    { path: 'my_office/daily_report/daily_report_authorization', component: () => import('./components/my_office/daily_report_authorization.vue') }, 
]

const system = [
    {path: 'system/base_set/company_unit', component: () => import('./components/system/base_set/unit.vue')},
    {path: 'system/base_set/organization_structure', component: () => import('./components/system/base_set/organization_structure.vue')},
    {path: 'system/base_set/user_management', component: () => import('./components/system/base_set/user_management.vue')},
    {path: 'system/base_set/group_management', component: () => import('./components/system/base_set/group_management.vue')},
    {path: 'system/base_set/menu_management', component: () => import('./components/system/base_set/menu_management.vue')},
    {path: 'system/base_set/home_item_management', component: () => import('./components/system/base_set/home_item_management.vue')},
    {path: 'system/base_set/doc_partition_management', component: () => import('./components/system/base_set/doc_partition_management.vue')},
    {path: 'system/mail_management/mail_send_receive_settings', component: () => import('./components/system/mail_management/mail_send_receive_settings.vue')},
    {path: 'system/mail_management/user_email_settings', component: () => import('./components/system/mail_management/user_email_settings.vue')},
    {path: 'system/instant_communication_management/server_settings', component: () => import('./components/system/instant_communication_management/server_settings.vue')},
    {path: 'system/instant_communication_management/session_management', component: () => import('./components/system/instant_communication_management/session_management.vue')},
    {path: 'system/instant_communication_management/application_management', component: () => import('./components/system/instant_communication_management/application_management.vue')},
    {path: 'system/instant_communication_management/session_record', component: () => import('./components/system/instant_communication_management/session_record.vue')},
    {path: 'system/subscription_management/subscription_management', component: () => import('./components/system/subscription_management/subscription_management.vue')},
    {path: 'system/subscription_management/subscription_report', component: () => import('./components/system/subscription_management/subscription_report.vue')},
    {path: 'system/permission_management/person_to_menu', component: () => import('./components/system/permission_management/person_to_menu.vue')},
    {path: 'system/permission_management/menu_to_person', component: () => import('./components/system/permission_management/menu_to_person.vue')},
    {path: 'system/permission_management/group_to_menu', component: () => import('./components/system/permission_management/group_to_menu.vue')},
    {path: 'system/permission_management/menu_to_group', component: () => import('./components/system/permission_management/menu_to_group.vue')},
    {path: 'system/permission_management/person_permission_view', component: () => import('./components/system/permission_management/person_permission_view.vue')},
    {path: 'system/system_tools/system_settings', component: () => import('./components/system/system_tools/system_settings.vue')},
    {path: 'system/system_tools/system_info', component: () => import('./components/system/system_tools/system_info.vue')},
    {path: 'system/system_tools/database_table', component: () => import('./components/system/system_tools/database_table.vue')},
    {path: 'system/system_tools/initialization_backup', component: () => import('./components/system/system_tools/initialization_backup.vue')},
    {path: 'system/system_tools/scheduled_tasks', component: () => import('./components/system/system_tools/scheduled_tasks.vue')},
    {path: 'system/system_tools/upload_file_management', component: () => import('./components/system/system_tools/upload_file_management.vue')},
    {path: 'system/system_tools/log_view', component: () => import('./components/system/system_tools/log_view.vue')},
    {path: 'system/system_tools/city_management', component: () => import('./components/system/system_tools/city_management.vue')},
]
const Client = [
    { path: 'customers/homepage', component: () => import('./components/Client/homepage.vue')},
    { path: 'customers/homepage/my_customers', component: () => import('./components/Client/my_customers.vue')},
    { path: 'customers/homepage/shared_with_me', component: () => import('./components/Client/shared_with_me.vue')},
    { path: 'customers/homepage/subordinate_customers', component: () => import('./components/Client/subordinate_customers.vue')},
    { path: 'customers/homepage/customer_allocation', component: () => import('./components/Client/customer_allocation.vue')},
    { path: 'customers/sales_opportunities/my_sales_opportunities', component: () => import('./components/Client/my_sales_opportunities.vue')},
    { path: 'customers/sales_opportunities/subordinate_sales_opportunities', component: () => import('./components/Client/subordinate_sales_opportunities.vue')},
    { path: 'customers/contracts/my_contracts', component: () => import('./components/Client/my_contracts.vue')},
    { path: 'customers/contracts/subordinate_contracts', component: () => import('./components/Client/subordinate_contracts.vue')},
    { path: 'customers/receipts/my_receipts', component: () => import('./components/Client/my_receipts.vue')},
    { path: 'customers/receipts/subordinate_receipts', component: () => import('./components/Client/subordinate_receipts.vue')},
    { path: 'customers/payments/my_payments', component: () => import('./components/Client/my_payments.vue')},
    { path: 'customers/payments/subordinate_payments', component: () => import('./components/Client/subordinate_payments.vue')},
    { path: 'customers/payments/subordinate_payments', component: () => import('./components/Client/subordinate_payments.vue')},
    { path: 'customers/stats/my_customer_stats', component: () => import('./components/Client/my_customer_stats.vue')},
    { path: 'customers/stats/subordinate_customer_stats', component: () => import('./components/Client/subordinate_customer_stats.vue')},
    { path: 'customers/amount_stats/my_finance_stats', component: () => import('./components/Client/my_finance_stats.vue')},
    { path: 'customers/amount_stats/annual_stats', component: () => import('./components/Client/annual_stats.vue')},
    { path: 'customers/inspection/customer_overview', component: () => import('./components/Client/customer_overview.vue')},
    { path: 'customers/inspection/all_sales_opportunities', component: () => import('./components/Client/all_sales_opportunities.vue')},
    { path: 'customers/inspection/all_customer_contracts', component: () => import('./components/Client/all_customer_contracts.vue')},
    { path: 'customers/inspection/all_receipts', component: () => import('./components/Client/all_receipts.vue')},
    { path: 'customers/inspection/all_finance_stats', component: () => import('./components/Client/all_finance_stats.vue')},

]

const tasks=[
    {path:"tasks/project_management/executing_projects",component:()=>import('./components/tasks/project_management/executing_projects.vue')},
    {path:"tasks/project_management/unfinished_projects",component:()=>import('./components/tasks/project_management/unfinished_projects.vue')},
    {path:"tasks/project_management/responsible_projects",component:()=>import('./components/tasks/project_management/responsible_projects.vue')},
    {path:"tasks/project_management/created_projects",component:()=>import('./components/tasks/project_management/created_projects.vue')},
    {path:"tasks/project_management/all_projects",component:()=>import('./components/tasks/project_management/all_projects.vue')},
    {path:"tasks/my_tasks",component:()=>import('./components/tasks/my_tasks.vue')},
    {path:"tasks/unfinished_tasks",component:()=>import('./components/tasks/unfinished_tasks.vue')},
    {path:"tasks/subordinate_tasks",component:()=>import('./components/tasks/subordinate_tasks.vue')},
    {path:"tasks/created_tasks",component:()=>import('./components/tasks/created_tasks.vue')},
    {path:"tasks/task_supervision",component:()=>import('./components/tasks/task_supervision.vue')},
    {path:"tasks/all_tasks",component:()=>import('./components/tasks/all_tasks.vue')},
]

const admin = [
    {path: 'admin/item_base_management/warehouse_management', component:()=> import('./components/admin/item_base_management/warehouse_management.vue'), children:[
        {path:"base",component:() => import('./components/admin/xiang/basex.vue')},
        {path:"update",component:() => import('./components/admin/xiang/update.vue')},
    ]},
    {path: 'admin/item_base_management/supplier_management', component:()=> import('./components/admin/item_base_management/supplier_management.vue')},
    {path: 'admin/item_base_management/item_list', component:()=> import('./components/admin/item_base_management/item_list.vue')},
    {path: 'admin/item_management/in_out_operations', component:()=> import('./components/admin/item_management/in_out_operations.vue')},
    {path: 'admin/item_management/in_out_details', component:()=> import('./components/admin/item_management/in_out_details.vue')},
    {path: 'admin/item_management/item_purchase', component:()=> import('./components/admin/item_management/item_purchase.vue')},
    {path: 'admin/item_management/item_lease', component:()=> import('./components/admin/item_management/item_lease.vue')},
    {path: 'admin/item_management/item_inventory', component:()=> import('./components/admin/item_management/item_inventory.vue')},
    {path: 'admin/fixed_assets', component:()=> import('./components/admin/fixed_assets.vue')},
    {path: 'admin/vehicle_management/vehicle_list', component:()=> import('./components/admin/vehicle_management/vehicle_list.vue')},
    {path: 'admin/vehicle_management/vehicle_registration', component:()=> import('./components/admin/vehicle_management/vehicle_registration.vue')},
    {path: 'admin/vehicle_management/vehicle_reservation_query', component:()=> import('./components/admin/vehicle_management/vehicle_reservation_query.vue')},
    {path: 'admin/vehicle_management/vehicle_reservation_status', component:()=> import('./components/admin/vehicle_management/vehicle_reservation_status.vue')},
    {path: 'admin/vehicle_management/vehicle_maintenance', component:()=> import('./components/admin/vehicle_management/vehicle_maintenance.vue')},
    {path: 'admin/vehicle_management/vehicle_upkeep', component:()=> import('./components/admin/vehicle_management/vehicle_upkeep.vue')},
    {path: 'admin/financial_management/financial_management', component:()=> import('./components/admin/financial_management/financial_management.vue')},
    {path: 'admin/financial_management/expense_reimbursement_report', component:()=> import('./components/admin/financial_management/expense_reimbursement_report.vue')},
    {path: 'admin/financial_management/business_trip_reimbursement', component:()=> import('./components/admin/financial_management/business_trip_reimbursement.vue')},
    {path: 'admin/financial_management/loan_bill', component:()=> import('./components/admin/financial_management/loan_bill.vue')},
    {path: 'admin/financial_management/loan_bill_statistics', component:()=> import('./components/admin/financial_management/loan_bill_statistics.vue')},
    {path: 'admin/financial_management/repayment_bill', component:()=> import('./components/admin/financial_management/repayment_bill.vue')},
    {path: 'admin/financial_management/payment_application', component:()=> import('./components/admin/financial_management/payment_application.vue')},
    {path: 'admin/financial_management/invoice_application', component:()=> import('./components/admin/financial_management/invoice_application.vue')},
    {path: 'admin/book_management/book_list', component:()=> import('./components/admin/book_management/book_list.vue')},
    {path: 'admin/book_management/book_borrowing', component:()=> import('./components/admin/book_management/book_borrowing.vue')},
    {path: 'admin/seal_management/seal_list', component:()=> import('./components//admin/seal_management/seal_list.vue')},
    {path: 'admin/seal_management/seal_application_query', component:()=> import('./components/admin/seal_management/seal_application_query.vue')},
]

const routes = [
    {
        path: '/home', component: () => import('@/pages/home.vue'), children: [
            ...my_office,
            ...system,
            ...Client,
            ...tasks,
            ...admin,
        ]
    },
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})


export default router